From 296749cb10305ccb132b4cc5d5bdee9038362e83 Mon Sep 17 00:00:00 2001 From: "emellor@leeni.uk.xensource.com" Date: Tue, 13 Dec 2005 00:10:19 +0000 Subject: [PATCH] Don't try and close the pipe to the grandparent if it has already been closed (i.e. we have restarted Xend). Signed-off-by: Ewan Mellor --- tools/python/xen/xend/server/SrvDaemon.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/python/xen/xend/server/SrvDaemon.py b/tools/python/xen/xend/server/SrvDaemon.py index 0a20752100..866990caf8 100644 --- a/tools/python/xen/xend/server/SrvDaemon.py +++ b/tools/python/xen/xend/server/SrvDaemon.py @@ -167,8 +167,9 @@ class Daemon: while True: pid = self.fork_pid() if pid: - os.close(w) - w = False + if w is not None: + os.close(w) + w = None (_, status) = os.waitpid(pid, 0) -- 2.30.2